package com.it2297.main;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Date;


import javax.swing.Box;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.border.EmptyBorder;

import com.it2297.model.Company;
import com.it2297.model.User;
import com.it2297.view.ManageApplication;
import com.it2297.view.ViewShortlistedApplications;

public class CompanyApp extends JFrame {
	private JPanel contentPane;
	private static Company currentUser = null;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					CompanyApp frame = new CompanyApp();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public CompanyApp() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);

		/*** JPANELS ***/
		setBounds(100, 100, 740, 560);
  		setLocationRelativeTo(null);
		ViewShortlistedApplications sj = new ViewShortlistedApplications();
		contentPane.add(sj);
		
		/*
		setBounds(100, 100, 740, 560);
  		setLocationRelativeTo(null);
		JobSearchJob sj = new JobSearchJob();
		contentPane.add(sj);
		*/
		
		/*
		setBounds(100, 100, 740, 560);
		setLocationRelativeTo(null);
		JobRemoveApplication cc = new JobRemoveApplication();
		contentPane.add(cc);
		*/
	}
	
	/****DO NOT DELETE****/
	public static Company getCurrentUser()
		{
			return currentUser;
		}
		
		public static void setCurrentUser(Company currentUser)
		{
			CompanyApp.currentUser = currentUser;
		}
		
		public static boolean isUserLogin()
		{
			boolean islogin = false;
			if (currentUser != null)
			{
				islogin = true;
			}
			return islogin;
		}
		
		public static void logoutUser()
		{
			CompanyApp.setCurrentUser(null);
		}

		public void closeWindow()
		{
			this.dispose();
		}
}
